package com.fansl.allround.open.api.constant.enums;

import com.fansl.allround.open.api.constant.enums.juhe.NewsTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * @author fansl
 * @Description: 开放api类型
 * @date 2019/11/4 14:53
 */
@Getter
@AllArgsConstructor
public enum OpenApiTypeEnum {

    JUHE("JUHE","聚合API");

    private String name;
    private String desc;

    public static OpenApiTypeEnum getByName(String name){
        for (OpenApiTypeEnum enums:Arrays.asList(OpenApiTypeEnum.values())) {
            if(enums.getName().equals(name)){
                return enums;
            }
        }
        return null;
    }
}
